package com.javatimes.test.service.imple;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.javatimes.test.dao.imple.DeptDAO;
import com.javatimes.test.po.Dept;
import com.javatimes.test.service.IDeptService;

@Service
public class DeptService implements IDeptService{

	private DeptDAO deptDao;
	
	@Autowired
	public void setDeptDao(DeptDAO deptDao) {
		this.deptDao = deptDao;
	}

	/**
	 * 删除操作
	 */
	public void delete(Dept d) {
		deptDao.delete(d);
	}

	
	/**
	 * 查找一条数据操作
	 */
	public Dept findById(Byte b) {
		return this.deptDao.findById(b);
	}

	public List<Map<String, Object>> queryDept(int id) {
		return this.deptDao.queryDept(id);
	}

	public void save(Dept d) {
		this.deptDao.save(d);
	}

	public void update(Dept d) {
		this.deptDao.update(d);
	}

	public List<Dept> queryAll() {
		return this.deptDao.queryAll();
	}

	
	
}
